In many instruments, the switches, dials and other physical controls have been replaced by computers. Instead of adjusting the setting on a particular dial to adjust a particular physical parameter, the user of the instrument must now type in a corresponding instruction on the keyboard of the instrument's computer. While the use of computer controls may have many advantages (e.g., the ability to automatically check for parametric inputs which might be injurious to the instrument, the materials affected by the instrument, or the instrument's user), it also has wrought a number of problems.
The primary problem addressed by the present invention is the need to be able to adjust a physical parameter without stopping the processes being performed by the instrument. In the prior art controllers which used dials and the like, this was no problem. You just turned the dial, and this directly produced a physical change. Furthermore, this adjustment usually did not require stopping the process being run by the instrument. One problem with the use of dials and switches which directly controlled physical parameters was that, in some instances, changing a physical parameter in the middle of a process cycle might produce unpredictable results.
In a computer controlled instrument there is generally a software routine, herein called an instrument control program, which controls or oversees the process being run by the instrument. The nature of the instrument's process is typically controlled by parameters supplied either by the software's author or by the instrument's user.
To change one or more of these parameters' value, one must somehow interrupt the use of the instrument's control program. Note that the goal here is to simulate the use of a physical dial or switch as closely as possible. Thus, one would like to be able to "tweak" one or more parameters while the instrument's process continues to run. The result of adjusting the parameter(s) is then observed on the instrument's control panel, or however the results of the process are normally observed.
The main prior art method for changing a parameter value in the middle of running a computer program would be to simply interrupt the control program whenever the instrument's computer detects keyboard input. Virtually every prior art implementation of this solution, however, will cause the instrument control program to be stopped for unacceptably large periods of time.
In instruments such as mass spectrometers which repetitively or cyclically perform a process, the inventors have found that the best time to momentarily interrupt a process to adjust its parameters is between process cycles. A process cycle is typically defined by an instruction loop in an instrument control program. Further, the inventors have found that it is advantageous to use a concurrently running task to compile new user programs, and to then run successfully compiled new user programs between process cycles of the currently running control program. In this way, the newly compiled program interrupts the currently running program as only as long as necessary to execute its instructions. If the newly compiled program merely resets a parameter, this interruption is generally so short as to be unnoticeable. If, on the other hand, the newly compiled program is designed to control the instrument's process for a period of time, the new program takes control until it finishes execution. Thus the present invention provides not only the feel of being able to reset parameter values "on the fly", but also provides a flexible tool for revising a control program "on the fly".
It is therefore a primary object of the present invention to provide an improved instrument control method which allows parametric and other adjustments of a cyclic computer controlled process to be made without having to stop and restart the process.
A primary feature of the present invention is the interruption of the currently running instrument control program with a more recently provided control program, but only when the currently running program is about to perform a jump back at the end of an instruction loop. Newly input control programs are compiled by a separate concurrent task, thereby allowing the entry of new commands and programs without interfering with the running of the currently running control program.